import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: HomeView,
    children:[
      {
        path: '/sys-admin/product/album/add-new',
        component: () => import('../views/sys-admin/product/album/AlbumAddNewView')
      }
      ,
      {
        path: '/sys-admin/product/album',
        component: () => import('../views/sys-admin/product/album/AlbumListView')
      }
      ,
      {
        path: '/sys-admin/product/category',
        component: () => import('../views/sys-admin/product/category/CategoryListView')
      }
      ,
      {
        path: '/sys-admin/permission/admin/add-new',
        component: () => import('../views/sys-admin/permission/AdminAddNewView')
      }
      ,
      {
        path: '/sys-admin/permission/admin',
        component: () => import('../views/sys-admin/permission/AdminListView')
      }
    ]
  },
  {
    path: '/about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/other',
    component: () => import('../views/OtherView')
  }
  ,
  {
    path: '/login',
    component: () => import('../views/LoginView')
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
